<?php

/**
 * Permiso form base class.
 *
 * @package    hegeprosoft
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BasePermisoForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'pem_IdPermiso' => new sfWidgetFormInputHidden(),
      'pem_usuario'   => new sfWidgetFormInput(),
      'pem_modulo'    => new sfWidgetFormPropelChoice(array('model' => 'Modulo', 'add_empty' => false)),
      'mod_tipo'      => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'pem_IdPermiso' => new sfValidatorPropelChoice(array('model' => 'Permiso', 'column' => 'pem_IdPermiso', 'required' => false)),
      'pem_usuario'   => new sfValidatorString(array('max_length' => 255)),
      'pem_modulo'    => new sfValidatorPropelChoice(array('model' => 'Modulo', 'column' => 'mod_IdModulo')),
      'mod_tipo'      => new sfValidatorString(array('max_length' => 10, 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('permiso[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Permiso';
  }


}
